function reseverStr(str) {
    let arr = str.split('')
    for (let i = 0; i < arr.length / 2; i++) {
        [arr[i], arr[arr.length - i - 1]] = [arr[arr.length - i - 1], arr[i]]
    }
    return arr.join("");
}
// 记得先切割

let arr = String("jiao")
let s = reseverStr(arr)
console.log(s)